package test;

/**
 * -@Version 1.0
 * -@Author:Vpen
 * -@Date:2021/6/10 18:31
 * -@Content:
 */
public class OutterClass {
    public static String outerStr;
    public transient String o;
    public static void main(String[] args) {
        OutterClass.outerStr="Outer";
        OutterClass.StaticInnerClass staticInnerClass = new StaticInnerClass();
        OutterClass.StaticInnerClass.print();
        staticInnerClass.printAge();
        
        OutterClass.InnerClass innerClass = new OutterClass().new InnerClass();
        innerClass.printAge();
        SimFather simFather = new SimFather();
        
    }


    static class StaticInnerClass{
        private static  String  innerStr =outerStr+" inner";// 可以访问到外部类的静态成员变量
        private int age = 23;
        public static void print(){
            System.out.println(innerStr);
        }
        public void printAge(){

            System.out.println(age);
        }
    }

    private class InnerClass extends StaticInnerClass{

    }

}

class Father{
    public Father(){
        System.out.println("fanther");
    }
    public Father(String str){
        System.out.println(str);
    }
}
class SimFather extends Father{
    public SimFather(){}
    public SimFather(String str){
        System.out.println(str);
    }
}